<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/jsp/common/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>

    <title>登录-${title}</title>
    <%@include file="/WEB-INF/jsp/common/meta2.jsp" %>

    <style>
        #carousel-example-generic .item img {
            height: 250px;
            width: 100%;
        }

        body {
            padding-top: 6%;
            background: #0088cc;
            color: #0088CC;
        }

        .error-box {
            color: red;
            text-align: center;
            margin-top: 20px;
        }

        #loginForm {
            margin-bottom: 20px;
        }
    </style>

</head>
<body  id="LOGIN_PAGE">


<div class="container">
    <div class="row">

        <div class="col-lg-offset-4 col-lg-4 well-sm well">
            <form class="form-horizontal" role="form" id="loginForm" action="${ctx}/main.html" method="post">
                <h3 class="text-center">
                    南江县住房和城乡建设局
                </h3>
                <h4 class="text-center text-info">公文OA信息系统</h4>

                <div class="error-box"></div>

                <div class="form-group">
                    <label for="userName" class="col-sm-2 control-label">
                        <span class="glyphicon glyphicon-user"></span>
                    </label>

                    <div class="col-sm-9">
                        <input type="text" name="userName" class="form-control" id="userName" placeholder="请输入您的账号">
                    </div>
                </div>
                <div class="form-group">
                    <label for="password" class="col-sm-2 control-label">
                        <span class="glyphicon glyphicon-lock"></span>
                    </label>

                    <div class="col-sm-9">
                        <input type="password" name="password" class="form-control" id="password" placeholder="请输入您的密码">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox"> 记住用户名
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-9">
                        <button type="submit" class="btn btn-lg btn-info btn-block">登 录</button>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-9 text-center text-info">
                        <span>SYSTEM VERSION ${VERSION}</span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


</body>
</html>

<script type="text/javascript">
    $(function () {
        $("#loginForm").validate({
            rules: {
                userName: {
                    required: true
                },
                password: {
                    required: true
                }
            },
            errorPlacement: function (error, element) {
                error.appendTo($(".error-box"));
            },
            messages: {
                userName: {
                    required: "请输入用户名！"
                },
                password: {
                    required: "请输入登录密码！"
                }

            }
        });
    });
</script>